﻿@using Microsoft.AspNet.Identity
@if (Session[ZP.Common.ZPCommon.SESSION_Portal_Login] != null)
{
    using (Html.BeginForm("LogOff", "Login", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
    {
    @Html.AntiForgeryToken()

    @*<ul class="nav navbar-nav navbar-right">
        <li>
            @Html.ActionLink("你好，" + User.Identity.GetUserName() + "!", "Index", "Manage", routeValues: null, htmlAttributes: new { title = "Manage" })
        </li>
        <li><a href="javascript:document.getElementById('logoutForm').submit()">注销</a></li>
    </ul>*@
    <ul class="layui-nav layui-layout-right">
        <li class="layui-nav-item">@Html.ActionLink("你好，" + ((ZP.DTO.Common.PortalUserLoginDTO)Session[ZP.Common.ZPCommon.SESSION_Portal_Login]).name + "!", "Index", "Enterprise", routeValues: null, htmlAttributes: new { title = "Manage" })</li>
        <li class="layui-nav-item"><a href="javascript:document.getElementById('logoutForm').submit()">注销</a></li>
    </ul>
    }
}
else
{
    @*<ul class="nav navbar-nav navbar-right">
        <li>@Html.ActionLink("注册", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
        <li>@Html.ActionLink("登录", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
    </ul>*@

    <ul class="layui-nav layui-layout-right">
        @*<li class="layui-nav-item">@Html.ActionLink("注册", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>*@
        <li class="layui-nav-item">@Html.ActionLink("登录", "Index", "Login", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
    </ul>
}
